<template>
	<view class="baoming_view">
		<view class="pt1_view">
			<image src="../../static/a1.png" class="a1_img"></image>
			<view class="part2_box">
				<view class="c_tit">
					Application
				</view>
				<view class="c_info">
					Fill in your information
				</view>
			</view>
		</view>
		
		<view class="bottom_btns">
			<view class="c_input">
				<input type="text" v-model="zhanghao" placeholder="请输入Whatsapp账号"/>
			</view>
			<view class="c_input">
				<input type="text" v-model="name" placeholder="请输入姓名"/>
			</view>
			<view class="t_btn" @click="fenxiang">
				提交
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				zhanghao:"",
				name: '',
				code:""
			}
		},
		onShow() {
			
		},
		onLoad(ph) {
			this.code = ph.code
		},
		methods: {
			
			fenxiang(){
				
				let dataL = {
					code:this.code,
					user:this.zhanghao,
					name:this.name
				}
				this.$getApi("/blog/Index/index", dataL, res => {
					console.log(res, "优惠券")
					this.$store.commit("login",res.data.data)
					this.$msg("报名成功，请抽取兑换额度！")
					setTimeout(()=>{
						uni.navigateTo({
							url:"/pages/index/zhuanpan?item="+JSON.stringify(res.data)
						})
					},500)
					
				})
			}
		}
	}
</script>

<style lang="scss">
.baoming_view{
	.pt1_view{
		position: relative;
		.a1_img{
			width:750rpx;
			height: 700rpx;
		}
		.part2_box{
			padding:40rpx 0  40rpx 50rpx;
			position: absolute;
			bottom: 0;
			left: 0;
			.c_tit{
				font-size: 46rpx;
				font-weight: bold;
				padding: 20rpx 0;
			}
			.c_info{
				color: #999;
				font-size: 32rpx;
			}
		}
	}
	
	
	.bottom_btns{
		border-top: 2rpx solid #EEDEB8;
		border-radius: 50rpx 50rpx 0 0;
		padding:70rpx 50rpx 100rpx;
		position: fixed;
		left: 0;
		bottom: 0;
		width: 750rpx;
		box-sizing: border-box;
		background-color: #F8F7F2;
		.c_input{
			margin-bottom: 30rpx;
			input{
				border: 1rpx solid #E1CB92;
				padding: 26rpx 40rpx;
				border-radius: 50rpx;
			}
		}
		.t_btn{
			padding: 26rpx 40rpx;
			border-radius: 50rpx;
			color: #fff;
			background-color: #D4B25B;
			text-align: center;
			font-size: 32rpx;
		}
	}
}	
</style>
